﻿#include"AVLTree.h"


void test()
{
	AVLTree<int, int> a;
	vector<int> arr;
	
	for (int i = 0; i < 10000; i++)
	{
		int m = rand() + i;
		arr.push_back(m);
	}
	//插入10000个随机数
	for (auto e :arr)
	{
		a.Insert({ e,e });
		/*if (a.IsBalanceTree())
			cout << "是AVL树" << endl;
		else
			assert(false);*/
	}
	
	////再全部删除
	//for (auto e : arr)
	//{
	//	a.Erase(e);
	//	if (a.IsBalanceTree())
	//		cout << "是AVL树" << endl;
	//	else
	//		assert(false);
	//}
}


int main()
{
	test();
	return 0;
}